<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<%-- <t:base type="jquery,easyui,tools,DatePicker"></t:base> --%>

<link href="plug-in/toast/toastr.css" rel="stylesheet"/>
<link rel="stylesheet" href="plug-in/tools/css/metrole/common.css" type="text/css">
<link id="easyuiTheme" rel="stylesheet" href="plug-in/easyui/themes/metrole/easyui.css" type="text/css"></link>
<link id="easyuiTheme" rel="stylesheet" href="plug-in/easyui/themes/metrole/main.css" type="text/css"></link>
<link id="easyuiTheme" rel="stylesheet" href="plug-in/easyui/themes/metrole/icon.css" type="text/css"></link>
<link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">


<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"> </script> 
<script type="text/javascript" src="plug-in/mutiLang/zh-cn.js"></script> 
<script type="text/javascript" src="plug-in/jquery/jquery.cookie.js" ></script>
<script type="text/javascript" src="plug-in/jquery-plugs/storage/jquery.storageapi.min.js" ></script> 
<script src="plug-in/toast/toastr.min.js"></script>
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script> 
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min-1.4.5.js"></script>  
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script> 
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js?skin=metrole"></script> 
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script> 
<script type="text/javascript" src="plug-in/tools/json2.js" ></script> 
<script type="text/javascript" src="plug-in/easyui/datagrid-detailview.js"></script>

<div class="easyui-layout easyui4-5" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="teachTaskSetList" checkbox="true" detailFormatter="detailFormater"
  	fitColumns="true" title="教学项目查询" actionUrl="teachTaskQueryController.do?datagrid" 
  	idField="id" fit="true" queryMode="group" dataView="true" onExpandRow="expandRow">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="课程名称"  field="lesson.lessonName"   query="true" queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="班级"  field="className"   query="true" queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="专业"  field="major.majorName"   query="true" queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="实验学时"  field="expHour"     queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="人数"  field="peopleCount"     queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="任课教师"  field="teacher.realName"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="计划状态"  field="isWritten" formatterjs="function(v,rec){return v==1? '已填写':'未填写'}"   queryMode="single"  width="120"></t:dgCol>    
  </t:datagrid>
  </div>
 </div>
 

 <script type="text/javascript">
 
 
 
 function detailFormater(index,row){
	 return '<div class="ddv" style="padding:5px 0"></div>';
 }
 
 var currentIndex = null;
 function expandRow(index,row){
	 var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
 
	 ddv.panel({ 
		 height:360,
         border:false,
         cache:false,
         href:'teachTaskQueryController.do?showSetDetail&id='+row.id,
         onLoad:function(){
             $('#teachTaskSetList').datagrid('fixDetailRowHeight',index);
         }
     });
	 
	 currentIndex = index;
     $('#teachTaskSetList').datagrid('fixDetailRowHeight',index);  
 }
    
 </script>
 
 <style>
 	.ddv,.detailviewLeftTD{
 		padding-right:20px;
 		background-color: #eee;
 	}
  	.ddv .panel-header{
  		display: none;
  	}
  	.ddv .datagrid-toolbar{
  		display: none !important;
  	}
  	.detailTable,
  	.detailTable td{
  		border:none;
  	}
  	
  	.easyui4-5 span.l-btn-icon {
  		    float: left;
    	padding-left: 20px;
  	}
 </style>